factor theorem iwth 2 unknowns